{include file='public/meta' }
	<title>购买记录 - 木鱼内容管理系统</title>
</head>
<body>

 <div class="layui-fluid">
    <div class="layui-card">
        <div class="layui-card-header layui-form layuiadmin-card-header-auto">
            <div class="layui-form-item">
          <div class="layui-inline">
            <label class="layui-form-label">订单查找</label>
            <div class="layui-input-block">
              <input type="text" name="keywords" id="keywords" placeholder="请输入关键词" autocomplete="off" class="layui-input">
            </div>
          </div>
          
          
          <div class="layui-inline">
            <button class="layui-btn layuiadmin-btn-useradmin" type="submit" onclick="so()">
              <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
            </button>
          </div>
        </div>
        </div>

        <div class="layui-card-body">
            <div class="layui-table-body layui-table-main">
                <table class="layui-table">
                    <thead>
                        <tr>
                            
                            <th><div class="layui-table-cell" align="center"><span>ID</span></div></th>
                            <th><div class="layui-table-cell" align="center"><span>订单号</span></div></th>
                            <th><div class="layui-table-cell" align="center"><span>会员ID</span></div></th>
                            <th><div class="layui-table-cell" align="center"><span>产品ID</span></div></th>
                            <th><div class="layui-table-cell" align="center"><span>产品金额</span></div></th>
                            <th><div class="layui-table-cell" align="center"><span>购买类型</span></div></th>
                            <th><div class="layui-table-cell" align="center"><span>支付类型</span></div></th>
                            <th><div class="layui-table-cell" align="center"><span>支付状态</span></div></th>
                            <th><div class="layui-table-cell" align="center"><span>购买说明</span></div></th>
                            <th><div class="layui-table-cell" align="center"><span>购买时间</span></div></th>
                            <th><div class="layui-table-cell" align="center"><span>记录IP</span></div></th>
                        </tr>
                    </thead>
                    <tbody>
                        {foreach $log as $val}
                        <tr align="center">
                            <td>{$val.id}</td>
                            <td>{$val.order_id}</td>
                            <td>{$val.uid}</td>
                            <td>{$val.product_id}</td>
                            <td style="color:green;">{$val.money}</td>
                            {if $val.buy_type eq 0}
                            <td style="color:blue;">购买</td>
                            {else/}
                            <td style="color:green;">续费</td>
                            {/if}
                            {if $val.pay_type eq 0}
                            <td>QQ支付</td>
                            {elseif $val.pay_type eq 1}
                            <td>微信支付</td>
                            {elseif $val.pay_type eq 2}
                            <td>支付宝支付</td>
                            {elseif $val.pay_type eq 3}
                            <td>余额支付</td>
                            {else/}
                            <td>其他</td>
                            {/if}
                            <td>
                                <div class="layui-table-cell">
                                    {if $val.status eq 0}
                                    <a class="layui-btn-xs layui-btn layui-btn-danger">未付款</a>
                                     {else /}
                                    <a class="layui-btn-xs layui-btn layui-btn-btn">已付款</a>
                                    {/if}
                                </div>
                            </td>
                            <td>{$val.intro}</td>
                            <td>{:date("Y-m-d H:i:s",$val.create_time)}</td>
                            <td>{$val.buy_ip}</td>
                        </tr>
                        {/foreach}
                    </tbody>
                </table>
            </div>
            <div class="layui-box layui-laypage layui-laypage-molv">{$log|raw}</div>
        </div>
    </div>
</div>

	<!--_footer 作为公共模版分离出去-->
{include file='public/footer' }
	<!--/_footer /作为公共模版分离出去-->

	<!--请在下方写此页面业务相关的脚本-->

<script type="text/javascript">
  layui.config({
    base: '__ADMINST__layuiadmin/' //静态资源所在路径
  }).extend({
    index: 'lib/index' //主入口模块
  }).use(['index', 'useradmin', 'table'], function(){
    var $ = layui.$
    ,form = layui.form
    ,table = layui.table;
  });

	//点击搜索
	function so(){
		var keywords = $("#keywords").val();
		if(keywords == ""){
			layer.msg("请输入搜索内容！",{time:2000});
		}else{
			layer.open({
				title:"搜索内容",
				type:2,
				area:['100%','100%'],
				content: "{:url('Member/buySearch')}"+"?keywords="+keywords,
				end:function(){
					location.reload();
				}
			});
		}
	}
</script>
	<!--/请在上方写此页面业务相关的脚本-->
</body>
</html>
